\NeedsTeXFormat{LaTeX2e}%
\ProvidesClass{absr-tr}%
\LoadClass[a4paper,twoside]{article}%

\RequirePackage{graphics}%
\RequirePackage{fancyhdr}%
\RequirePackage{geometry}%
\geometry{left=3cm,right=3cm,top=3cm,bottom=3cm}
\RequirePackage[rgb,table]{xcolor}
\RequirePackage{xcolor}
\RequirePackage{cite}
\RequirePackage{amsthm}
\RequirePackage{flushend, cuted} %
\RequirePackage{indentfirst,latexsym,bm}
\RequirePackage{amsmath,amssymb,amsfonts}
\RequirePackage{pifont}
\RequirePackage{subfigure}
\RequirePackage{url}
\RequirePackage{mathrsfs}
\RequirePackage{multirow}
\RequirePackage{makecell}
\RequirePackage{array}
\RequirePackage{booktabs}
\RequirePackage{longtable}
\RequirePackage{caption}
\RequirePackage{epsfig}
\RequirePackage{float}
\RequirePackage{mathrsfs}
\RequirePackage{colortbl}
\RequirePackage{multirow}
\RequirePackage{graphicx}
\RequirePackage[pdftex,colorlinks,linkcolor=black]{hyperref}

\newcommand*{\absTitle}[1]{\def\mytitle{#1}}%
\newcommand*{\absVersion}[1]{\def\myversion{#1}}%
\newcommand*{\absDocNumber}[1]{\def\mydocnum{#1}}%
\newcommand*{\absCategory}[1]{\def\mycat{#1}}%
\newcommand*{\absAuthor}[1]{\def\myname{#1}}%
\newcommand*{\absEmail}[1]{\def\myemail{#1}}%

\providecommand{\absmakeheader}{%
    \pagestyle{fancy}
	\renewcommand{\headrulewidth}{0pt}
	\fancyhead{}
	\fancyfoot[RO,LE]{SIAE}
	\fancyfoot[LO,RE]{ABS}
	\parbox{15cm}{
		\centering
		\makebox[0.5cm][r]{\raisebox{2em}{LOGO(future)}}
		\makebox[13cm][c]{\textsf{\fontsize{28pt}{\baselineskip}\selectfont ABS Technical Document}}
		\makebox[1cm][l]{\raisebox{2em}{\copyright ABS}}
		\vspace{1em}
	}
	\parbox{15cm}{
		\begin{center}
		\begin{tabular}{|>{\columncolor{gray!25}}cc>{\columncolor{gray!25}}cc|}
		\hline
		\makebox[1.4cm][c]{\textbf{Title}}&
		\multicolumn{3}{l|}{\makebox[10.8cm][c]{\mytitle}}\\
		\hline
		\makebox[1.4cm][c]{\textbf{Version}}&
		\multicolumn{3}{l|}{\makebox[10.8cm][c]{\myversion}}\\
		\hline
		\makebox[1.4cm][c]{\textbf{Number}}&
		\makebox[4.8cm][c]{ABSR-TR-No.\mydocnum}&
		\makebox[1.4cm][c]{\textbf{Category}}&
		\makebox[4.8cm][c]{\mycat}\\
		\hline
		\makebox[1.4cm][c]{\textbf{Author}}&
		\makebox[4.8cm][c]{\myname}&
		\makebox[1.4cm][c]{\textbf{Email}}&
		\makebox[4.8cm][c]{\myemail}\\
		\hline
		\end{tabular}
		\end{center}		
	}
	\vspace{2em}
}

\newcommand*{\showcontents}{
	\tableofcontents
	\newpage	
	\fancyhead[RO,LE]{ABSR-TR-No.\mydocnum}%
	\fancyhead[LO,RE]{\bfseries \leftmark}
	\renewcommand{\headrulewidth}{0.4pt}
}

\newenvironment{absUpdateLog}
{\rowcolors{2}{gray!25}{gray!10}
	\makebox[14cm][c]{\large \textsf{Amendment History}}
 \begin{longtable}{|p{2cm}p{11cm}|}
	\rowcolor{blue!25}\makebox[2cm][c]{\textbf{Date}}&
		\makebox[11cm][c]{\textbf{Description}}\\
}
{\end{longtable}\newpage}

\newcommand*{\absEntry}[2]{\makebox[2cm][c]{#1}&
		#2\\}
